/* 主题覆盖样式 */

/* List 列表 */
.dark .adm-list {
  background-color: var(--color-bg);
  --border-inner: solid 1px var(--color-border-1);
  --border-top: solid 1px var(--color-border-1);
  --border-bottom: solid 1px var(--color-border-1);
}

.dark .adm-list-body {
  background-color: var(--color-bg);
  border-top: solid 1px var(--color-border-1);
  border-bottom: solid 1px var(--color-border-1);
}

.dark .adm-list-item {
  background-color: var(--color-bg);
  color: var(--color-text-1);
  border-bottom: solid 1px var(--color-border-1) !important;
}

.dark .adm-list-item-content-main {
  color: var(--color-text-1);
}

.dark .adm-list-item-description {
  color: var(--color-text-3);
}

/* SearchBar 搜索框 */
.dark .adm-search-bar {
  background-color: var(--color-bg);
}

.dark .adm-search-bar-input-box input {
  color: var(--color-text-1) !important;
}

/* SearchBar 聚焦状态 */
.dark .adm-search-bar.adm-search-bar-active .adm-search-bar-input-box {
  background-color: var(--color-fill-2) !important;
}

/* NavBar 导航栏 */
.dark .adm-nav-bar {
  background-color: var(--color-bg);
  border-bottom: solid 1px var(--color-border);
}

.dark .adm-nav-bar-title {
  color: var(--color-text-1);
}

/* TabBar 标签栏 */
.dark .adm-tab-bar {
  background-color: var(--color-bg);
  border-top: solid 1px var(--color-border);
}

.dark .adm-tab-bar-item {
  color: var(--color-text-2);
}

.dark .adm-tab-bar-item-active {
  color: var(--color-primary);
}

/* Popup 弹出层 */
.dark .adm-popup-body,
.dark .adm-action-sheet,
.dark .adm-action-sheet-button-list {
  background-color: var(--color-bg);
}

.dark .adm-action-sheet-button-item {
  background-color: var(--color-bg);
  color: var(--color-text-1);
}

/* Modal 和 Dialog 对话框 */
.dark .adm-center-popup-body,
.dark .adm-modal-content,
.dark .adm-dialog-content {
  background-color: var(--color-bg);
  color: var(--color-text-1);
}

/* Input 输入框 */
.dark .adm-input.login-input .adm-input-element {
  color: #111827 !important;
}

.dark .adm-input, .dark .adm-input-element {
  color: var(--color-text-1) !important;
}

/* 深色模式下的点击效果 */
.dark .adm-list-item:active {
  background-color: var(--color-bg-hover) !important;
}

.dark .adm-action-sheet-button-item:active {
  background-color: var(--color-bg-hover) !important;
}

.dark .adm-button:active {
  background-color: var(--color-bg-hover) !important;
}


/* ========== @ant-design/x 聊天组件 ========== */

/* 聊天容器 */
.dark .ant-conversations,
.dark .ant-chat-container {
  background-color: var(--color-background-body) !important;
}

/* Bubble 气泡消息 */
.dark .ant-bubble {
  color: var(--color-text-1) !important;
  border-color: var(--color-border-1) !important;
}

.dark .ant-bubble-content {
  color: var(--color-text-1) !important;
}

.dark .ant-bubble-content-filled {
  background-color: var(--color-fill-3) !important;
}

/* AI 消息 */
.dark .ant-bubble[data-role="ai"] {
  background-color: var(--color-fill-4) !important;
  color: var(--color-text-1) !important;
}

.dark .ant-bubble[data-role="ai"] .ant-bubble-content-filled {
  background-color: var(--color-fill-3) !important;
}

/* 用户消息 */
.dark .ant-bubble[data-role="local"] {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
}

/* Sender 输入区域 */
.dark .ant-sender {
  background-color: var(--color-bg) !important;
  border-top: solid 1px var(--color-border) !important;
}

.dark .ant-sender-input {
  color: var(--color-text-1) !important;
  border-color: var(--color-border-1) !important;
}

.dark .ant-sender-input::placeholder {
  color: var(--color-text-3) !important;
}

.dark .ant-sender-input textarea {
  color: var(--color-text-1) !important;
}

.dark .ant-sender-button {
  color: var(--color-primary) !important;
}

/* Actions 操作按钮 */

.dark .ant-actions .ant-actions-list {
  color: var(--color-text-2) !important;
}

/* Picker 选择器 */

.dark .adm-picker-view {
  background-color: var(--color-bg) !important;
}

.dark .adm-picker-view-column-item {
  color: var(--color-text-3);
}

.dark .adm-picker-view-column-wheel .adm-picker-view-column-item-active {
  color: var(--color-text-1) !important;
}
  
.dark .adm-picker-view-mask .adm-picker-view-mask-top,
.dark .adm-picker-view-mask .adm-picker-view-mask-bottom {
  background-color: var(--color-bg) !important;
}

/* ========== Slider 滑块修复 ========== */
/* 修复 Tailwind CSS 全局样式对 Slider 的影响 */

.adm-slider {
  box-sizing: content-box !important;
}

.adm-slider * {
  box-sizing: content-box !important;
}

.adm-slider-track {
  box-sizing: content-box !important;
}

.adm-slider-fill {
  box-sizing: content-box !important;
}

.adm-slider-thumb-container {
  box-sizing: content-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.adm-slider-thumb {
  box-sizing: content-box !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
}

.adm-slider-thumb-icon {
  box-sizing: content-box !important;
}
